import Ad_List from '@/views/advertise/ad_List/Ad_List.vue';
import Advertise from '@/views/advertise/Advertise.vue';
import Home from '@/views/home/Home.vue'
import Layout from '@/views/layout/Layout.vue'
import Collect from '@/views/order/collect/Collect.vue';
import Order from '@/views/order/Order.vue';
import OrderList from '@/views/order/orderList/Order-List.vue';
import Vue from 'vue'
import VueRouter from 'vue-router'


const Product = ()=> import('../views/product/Product.vue');
const List = ()=> import('../views/product/list/List.vue');
const Category =()=> import('../views/product/category/Category.vue')





Vue.use(VueRouter)

const routes = [
  {
    path:'/',
    name:'layout',
    component:Layout,
    children:[
      {
        path:'/',
        name:'home',
        component:Home
      },
      {
        path:'/product',
        name:'product',
        component:Product,
        children:[
          {
            path:'/list',
            name:'list',
            component:List
          },
          {
            path:'/category',
            name:'category',
            component:Category
          },
        ]
      },
      {
        path:'/order',
        name:'order',
        component:Order,
        children:[
          {
            path:'/orderlist',
            name:'orderlist',
            component:OrderList
          },
          {
            path:'/collect',
            name:'collect',
            component:Collect
          },
        ]
      },
      {
        path:'/advertise',
        name:'advertise',
        component:Advertise,
        children:[
          {
            path:'/adlist',
            name:'adlist',
            component:Ad_List
          },
          {
            path:'/category',
            name:'category',
            component:Category
          },
        ]
      },

      
    ]
  }
  
]

const router = new VueRouter({
  routes
})

export default router
